package com.hbmcc.heshenghuo.util

import android.graphics.drawable.BitmapDrawable
import android.graphics.drawable.ColorDrawable
import android.graphics.drawable.Drawable
import androidx.core.content.ContextCompat

import androidx.databinding.BindingConversion
import com.hbmcc.heshenghuo.DaggerApplication

/**
 * @author 支豪亮
 * @date 2021/11/22 4:24 下午
 * @des
 */
object Conversion {
    @JvmStatic
    @BindingConversion
    fun convertColorToDrawable(resourceId: Int): Drawable {
        return ContextCompat.getDrawable( DaggerApplication.ins!!.applicationContext,resourceId)!!
    }
}